﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kendo.Mvc.UI;
using Kendo.Mvc.Extensions;
using VnResource.DataContract.Models;
using VnResource.BusinessLogic;

namespace KendoUIMvcApplication3.Controllers
{
    //public class HomeController : Controller
    //{
    //    public ActionResult Index()
    //    {
    //        ViewBag.Message = "Welcome to ASP.NET MVC!";

    //        return View();
    //    }

    //    public ActionResult About()
    //    {
    //        return View();
    //    }

    //    public ActionResult Editing_Popup()
    //    {
    //        return View();
    //    }

    //    //public ActionResult EditingPopup_Read([DataSourceRequest] DataSourceRequest request)
    //    //{
    //    //    return Json(HRMRepository.Instance.GetModelDB().ToDataSourceResult(request));
    //    //}

    //    [AcceptVerbs(HttpVerbs.Post)]
    //    public ActionResult EditingPopup_Create([DataSourceRequest] DataSourceRequest request, ProductViewModel product)
    //    {
    //        if (product != null && ModelState.IsValid)
    //        {
    //            //getModel().Create(product);
    //        }
    //      //  HRMRepository.Instance.InsertProduct(product);
    //        return Json(new[] { product }.ToDataSourceResult(request, ModelState));
    //    }

    //    [AcceptVerbs(HttpVerbs.Post)]
    //    public ActionResult EditingPopup_Update([DataSourceRequest] DataSourceRequest request, ProductViewModel product)
    //    {
    //        if (product != null && ModelState.IsValid)
    //        {
    //            //getModel().Update(product);
    //        }

    //        return Json(new[] { product }.ToDataSourceResult(request, ModelState));
    //    }

    //    [AcceptVerbs(HttpVerbs.Post)]
    //    public ActionResult EditingPopup_Destroy([DataSourceRequest] DataSourceRequest request, ProductViewModel product)
    //    {
    //        if (product != null)
    //        {
    //            //getModel().Destroy(product);
    //        }
    //       // HRMRepository.Instance.DeleteTest(product);
    //        return Json(new[] { product }.ToDataSourceResult(request, ModelState));
    //    }

    //}

}
